package com.itheima.exer.homework.hw1008;

import java.io.File;

public class FileTest1 {
    public static void main(String[] args) {
        File file = new File("E:\\z实验文件夹\\A");
        method(file);
    }

    private static void method(File file) {
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isFile()){
                file1.delete();
            }else {
                method(file1);
            }
        }
        file.delete();
    }
}
